package routers

import (
	"blog/controllers/fan"

	"github.com/gin-gonic/gin"
)

func DefaultRoutersInit(r *gin.Engine) {
	defaultRouters := r.Group("/")
	{
		defaultRouters.GET("/", fan.DefaultController{}.Index)
		defaultRouters.GET("/news", fan.DefaultController{}.News)
		defaultRouters.GET("/content/:id", fan.DefaultController{}.Content)
		defaultRouters.GET("/cat/:id", fan.DefaultController{}.Cat)
		defaultRouters.GET("/cat/:id/:page", fan.DefaultController{}.Cat)
		defaultRouters.GET("/search", fan.DefaultController{}.Search)
		defaultRouters.GET("/login", fan.DefaultController{}.Login)
		defaultRouters.GET("/lov", fan.DefaultController{}.Lov)
		defaultRouters.GET("/reg", fan.DefaultController{}.Reg)
		defaultRouters.POST("/doreg", fan.DefaultController{}.DoReg)
		defaultRouters.POST("/dologin", fan.DefaultController{}.DoLogin)
	}
}
